<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$db_name = 'banhuaisai';

if(@mysql_connect($host,$user,$pass)===false)
{
    echo 'Please check your hostname or username or password are correct.';
    echo '<br />';
    echo '<strong>Error:&nbsp;</strong>'.mysql_error();
}
else
{
    if(@mysql_select_db($db_name)===false)
    {
        echo 'Please check your database name are correct.';
        echo '<br />';
        echo '<strong>Error:&nbsp;</strong>'.mysql_error();
    }
    else
    {
        mysql_query("SET NAMES tis620");
    }
}
?>